package cn.ecnu.pojo.resume;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import javax.validation.constraints.*;
import java.util.Date;

@Data
@TableName(value = "resume_basic")
/*求职者-基本信息 */
public class ResumeBasic {

    @TableId(value = "user_id")
    @NotNull(message = "userId不能为空")
    private Integer userId;

    @Pattern(regexp = "^[\\u4e00-\\u9fa5]{2,5}$", message = "姓名必须为长度2~5的中文字符")
    @NotBlank(message = "姓名不能为空")
    private String name;

    @JsonFormat(pattern = "yyyy-MM-dd")
    @NotNull(message = "出生日期不能为空")
    private Date birthday;

    private Integer qualificationNew; //最高学历

//    @Pattern(regexp = "^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\\d{8}$", message = "请输入正确的手机号码")
//    @Pattern(regexp = "^1[3|4|5|7|8][0-9]{9}$", message = "请输入正确的手机号码")
    @Pattern(regexp = "^1[0-9]{10}$", message = "请输入正确的手机号码")
    @NotNull(message = "手机号不能为空")
    private String phone;

    @Email(message = "邮箱格式错误")
    @NotEmpty(message = "邮箱不能为空")
    private String email;
}
